import React from 'react';
import { Tabs } from 'antd';
import { ContentPackage, TabC } from '../../comps';

// 组件引用
import SceneSettings from './sceneSettings';
import ModelSettings from './modelSettings';

// 样式引用
import styles from './index.less';

const { TabPane } = Tabs;
class StressTestReportSettings extends React.Component {
  constructor() {
    super();
    this.state = {
      activeKey: '1',
    };
  }

  changeTab = (key) => {
    this.setState({
      activeKey: key,
    });
  };

  render() {
    const { activeKey } = this.state;
    return (
      <ContentPackage
        title='压力测试报告设置'
        contentHtml={
          <div>
            <div className={styles.reportBox}>
              <TabC
                tabSource={[
                  { title: '情景设置', key: '1', content: <SceneSettings /> },
                  { title: '模板设置', key: '2', content: <ModelSettings /> },
                ]}
                activeKey={activeKey}
                onChange={this.changeTab}
              />
            </div>
          </div>
        }
      />
    );
  }
}
export default StressTestReportSettings;
